//
//  AudioExampleViewController.m
//  TestAispeech
//
//  Created by shaowei on 13-9-7.
//  Copyright (c) 2013年 LianZhan. All rights reserved.
//

#import "AudioSetPwdViewController.h"

@interface AudioSetPwdViewController ()<AiRecognizerDelegate>

@end

@implementation AudioSetPwdViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc
{
    Block_release(_completeHandle);
    [super dealloc];
}


- (IBAction)actionSetPwd:(id)sender {
    if (self.textViewOfResult.text.length) {
        [AudioManager setAudioPwd:self.textViewOfResult.text];
        ALERT_VIEW(@"声音密码设置成功", nil);
        if (_completeHandle) {
            _completeHandle(YES);
        }
    }else{
        ALERT_VIEW(@"密码不能为空,请开始声音识别", nil);
    }
    
    
}

@end
